package org.n.shop.result;

public enum ResultCode {
    SYSTEM_BUSY(-1, "system busy"),
    SUCCESS(200, "success"),
    FAIL(400, "fail"),
    ERROR_ACCOUNT_PASSWORD(401, "Incorrect account password"),
    REJECT_REQUEST(403, "reject request"),
    NOT_FOUND(404, "not found"),
    TOKEN_MISSION(405, "token mission"),
    TOKEN_OVERDUE(406, "token overdue"),
    HAVE_NO_LEGAL_POWER(407, "Have no legal power"),
    SERVER_INTERNAL_ERROR(500, "Server internal error"),
    SERVICE_IS_NOT_AVAILABLE(503, "service is not available");

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
